import { defineStore } from 'pinia'
import { store } from '@/store';
//用于处理数据传参问题
export const useParamsStore = defineStore({
  id: 'params-store',
  state: () => ({
    params: {}
  }),
  getters: {
    getParams(): any {
      return this.params
    }
  },
  actions: {
    setParams(data) {
      this.params = data
    },
    reloadParams() {
      this.params = {}
    }
  },
})
// Need to be used outside the setup
export function useParamsStoreWithOut() {
  return useParamsStore(store);
}